package chapter21.section2;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ExceptionThread implements Runnable {
    public static void main(String[] args) {
        try {
            ExecutorService exec = Executors.newCachedThreadPool();
            exec.execute(new ExceptionThread());
            exec.shutdown();
        } catch (Exception exception) {
            System.out.println("exception");
            exception.printStackTrace();
        }

    }

    @Override
    public void run() {
        throw new RuntimeException();
    }
}
